
<#include "/common/head.html"/>
 
<table id="dg_pdd"></table>
    <!-- <div id="tb_pdd" style="padding:2px 5px;">
        <div class="wrap_search">
		        		
			            	<span class="search_item">
				            	<span class="item_text">物料编号: </span>
				            	<span class="item_obj">
				            		<input class="easyui-textbox" type="text" name="mat_no" id="mat_no" value=""/>
				            	</span>    
				            </span>
		        		
			            	<span class="search_item">
				            	<span class="item_text">物料名称: </span>
				            	<span class="item_obj">
				            		<input class="easyui-textbox" type="text" name="mat_name" id="mat_name" value=""/>
				            	</span>    
				            </span>
		        		
			        		<span class="search_item search_between">
				                <span class="item_text">盘点日期: </span>
				                <span class="item_obj">
				                    <input class="easyui-datebox" name="_start_pd_time" id="_start_pd_time" value=""/> ～ <input class="easyui-datebox" name="_end_pd_time" id="_end_pd_time" value=""/>
				                </span>
				            </span>
      		 <div id="searchBtnWrap" style="float:right; padding-right:5px;">           
                <a href="javascript:void(0)" class="easyui-linkbutton color1" iconCls="glyphicon-search" onclick="zcurdSearch(this)">搜索</a>
                <a href="javascript:void(0)" class="easyui-linkbutton color2" iconCls="glyphicon-repeat" onclick="flushPage()">重置</a>
            </div>
        </div>
    </div> -->
<script type="text/javascript">
var datagrid = $("#dg_pdd");
var param1 = {"queryParams[pd_id]":"${pd_id!}"};
var dgOptions = {
        rownumbers:true,
    	fit:true,
    	border:false,       
    	url:'listDetailData',
    	method:'post',
    	toolbar:'#tb_pdd',
    	pageSize: 10,
    	pagination:true,
    	multiSort:true,
    	multiSelect:false,
    	emptyMsg:"没有盘库记录",
        queryParams: param1,        
        columns: [[
		          {field:'mat_no', title: '物料编号', width:120, sortable: true}
	           	 ,{field:'mat_name', title: '物料名称', width:120, sortable: true}
	           	 ,{field:'cur_num', title: '账面数量', width:120, sortable: true}
	           	 ,{field:'fact_num', title: '实际数量', width:120, sortable: true}
	           	 ,{field:'pd_time', title: '盘点日期', width:120, sortable: true}
	           ]]
	};
$(function() {
	datagrid.datagrid(dgOptions);
});

function zcurdSearch() {
	var param = zcurdGetParam();
	datagrid.datagrid("load", {
		queryParams: param
	})
}

function zcurdGetParam() {	
	var param = {"pd_id":"${pd_id}"};
	$("#tb_pdd :input[name]").each(function(i, item) {
		if($(item).val()) {					
			param[$(item).attr("name")] = $(item).val();	
		}
	});
	return param;
}
</script>
<#include "/common/dialogWindow.html"/>
<#include "/common/foot.html"/>
